I. Field of the Invention
This invention relates to computer-numerically-controlled (CNC) systems such as CNC machining systems. More particularly, the present invention relates to an apparatus and method for correcting for servo following errors along curved portions of a programmed path of relative motion between a tool and a workpiece. A further principal aspect of the present invention relates to an apparatus and method for machining holes with a rotating tool, preferably using such radius correction, to facilitate rapid and accurate machining of holes over a wide range of diameters without need of changing tools.
II. Description of the Prior Art
By way of background, servo driven computer-numerically-controlled systems, such as machining systems, operate on a workpiece such as a part to be machined to a desired form, by effecting relative movement between the workpiece and a tool such as a rotating cutter or non-helical threading tool. A desired path of relative movement along various axes as well as other functions needed to machine the part are specified by program instructions which can be expressed in various forms such as the well known and widely used part programming language specified by EIA Standard RS-274. While those skilled in the art are thoroughly familiar with RS-274 programming, others will benefit from a brief explanation.
RS-274 programs consist of a series of blocks. Each block contains the commands required to perform a single step in the machining operation such as moving a tool at a specified feedrate from one location to another. The workpiece is machined by executing one block after another until all desired operations to be performed on the workpiece are completed.
Normal RS-274 block syntax consists of a sequence number followed by a preparatory code followed by one or more words and an end of block code. The sequence number provides a humanly identifiable reference to the block while the block label enables the specification of targets for branches or jumps. Each word includes a letter address followed by either a floating point number or a mathematical expression. Commonly used RS-274 letter addresses are as follows:
______________________________________ X, Y, Z Primary Linear Axes U, V, W Secondary Linear Axes A, B, C Primary Rotary Axes I, J, K Interpolation Parameters (e.g. Arc center point; thread lead) F Feedrate (e.g. spindle start/stop coolant, etc.) S Spindle Speed T Tool Code P Arc Radius (used with G02 or G03) ______________________________________
A floating point number following each letter address indicates a desired value for the word. For example: P 10.185 may be used to program an arc having a radius of 10.185 units.
RS-274 programs utilize a variable block length format. Only commands pertaining to new functions or changes from previously programmed values need be programmed in a later block. Therefore, once a word such as a desired feedrate is programmed, subsequent blocks need not include an F word until a change is desired.
The preparatory code (consisting of a G prefix followed by a number) defines the nature of the operation to be performed. Examples of standard RS-274 preparatory codes include:
______________________________________ G00 Point to Point positioning G01 Linear interpolation G02 Circular interpolation arc CW G03 Circular interpolation arc CCW G17, G18, G19 Plane selectors G40, G41, G42 Cutter Compensation Mode Selectors G90, G91 Absolute/Incremental Dimension Input Selections G93, G94, G95 Feedrate Mode Selectors ______________________________________
Still other preparatory codes such as those in the G80 through G89 series or user definable preparatory codes serve to indicate fixed cycle expansions of the type to be described shortly.
In a conventional CNC machining system such as one utilizing a control such as the ACRAMATIC.RTM. 950 available from Cincinnati Milacron, Inc. of Cincinnati, Ohio, a program for machining a workpiece is received for execution by a block processor which translates each block of RS-274 code into a machine recognizable numerical form. The block processor checks for errors by performing lexical and syntactical scans. It also evaluates any mathematical expressions which may be included in the block. The block processor then develops a block table including entries for each word which might be included in any given block. For each word, the table includes an entry indicating whether the word is present and if so, its numerical value.
In addition to handling simple program blocks representing individual moves along one or more axes, it is conventional in a number of modern CNC control systems, including the ACRAMATIC.RTM. 950, to be capable of invoking, by means of a single, parameterized instruction, a fixed cycle expansion subroutine consisting of a series of part program blocks. While such subroutines (which are in the nature of the so-called "expanded macros" in assembly language programming) are referred to by different names by different CNC control manufacturers, they are referred to herein as "fixed cycles". Fixed cycles are sometimes referred to using the terms "G code subroutines" or "G subs".
Fixed cycles are extremely useful in that they facilitate rapid programming of commonly repeated functions without need of setting out in the part program each line of code embodied in the fixed cycle. They can also be used to modify or limit part program instructions such as feedrate instructions. A number of commonly recognized fixed cycles are those invokable by RS-274 commands of the G-80 series (G80 through G89). However, a number of modern CNC controls such as the ACRAMATIC .RTM. 950 include facilities for running user-defined fixed cycles which can be invoked using other G codes. As will be explained hereinafter, the present invention may conveniently be implemented in otherwise conventional controls by exploiting the capability to carry out fixed cycles.
In the event the block processor encounters a block including a G code which does not correspond to a simple function, it consults a directory of G codes indicating which fixed cycles are present in a "G sub Store" memory area. Provided the G code is one designating an available fixed cycle, the system enables a G code expander which has access to data from the block table prepared by the block processor as well as a series of temporary registers which, in the ACRAMATIC .RTM. 950 are designated T.sub.1-99. The G code expander directs the block processor to the stored fixed cycle. This has the same effect on operation of the system as effectively inserting the blocks of the fixed cycle into the part program at the point where the fixed cycle G code appears. In response to a data request issued by a span processor, information from the block processor is transferred to the span processor whereupon the block processor takes up the next block from the fixed cycle. When the last block in the fixed cycle is reached, the G code expander is disabled and execution continues with the next block appearing in the part program.
The span processor prepares spans for execution. Provided proper part programming practices are followed, a series of spans (i.e. moves) are prepared well in advance of the time of their execution as machine motion. This allows implementation of the present invention as well as full exploitation of certain features to be described which require information concerning blocks to be executed somewhat remotely in time. The span processor includes a series of functional stages which are conventional in the art. The first of these stages, the block value calculator receives information from the block processor, performs a semantic check, executes any required conversion of units (e.g. English to metric), and fills in any values in the block table which, although not expressly programmed in a given block, are assumed to be present by default in subsequent blocks in accordance with previously programmed values.
A number of the other functional stages may also be included within the span processor. For example, some CNC controllers include a radius/fillet stage which provides the capability to insert appropriate radius and fillet instructions without need of including them expressly in the part program. Cutter diameter compensation (CDC) may be embodied in yet another stage. When invoked, this feature automatically performs the calculations needed to position a tool properly in accordance with its diameter so that a given workpiece surface dictated by the part program can be generated with tools of various diameters.
Where the path generator of a CNC machine controller is capable of accessing only limited arcuate movement data, such as single quadrant arcs, the span processor includes another stage for dividing data representing multi-quadrant arcs into a plurality of single quadrant arcs. A final geometry stage provides any offsets needed to account for the geometrical configuration of the machine itself. Finally, an acceleration/deceleration (ACC/DEC) stage examines a series of spans in advance of their execution for discontinuities such as unacceptably abrupt changes in direction or improperly coordinated multi-axis moves and develops suitable real time velocity profiles for each axis as required to maintain dynamic path accuracy. As their preparation via the above stages is completed, spans are loaded into a buffer from which they are available for span execution.
Span execution includes two principal functions which are carried out in ways well known in the art. These are sequencing of commands and interpolation. Sequencing insures that consecutive spans will be executed in proper order and that for each individual span, start span, move and end span operations will occur in proper order. For example, if a linear axis motion command, a spindle stop command and a spindle start command all appear in the same block of a part program, the sequencing function guarantees that the spindle will begin its rotation before the axis motion takes place and that the spindle will not stop until the axis motion is complete.
Interpolation involves resolving a command for a gross movement into series of small incremental position commands. Thus, while a span may call for moving along one or more axes from a starting point (usually the present position) to a defined end point some distance away or along an arc of a certain radius and center point to an end point, interpolation defines a series of short, finite moves between a series of intermediate points linking the starting point and the end point.
Following the span execution stage, span data for each axis is transferred to a respective path generator for that axis. The path generators develop a position command for each axis specifying desired position as a function of time. The position command for each axis is summed with an independent position command for that axis. The latter position commands are generated by what shall be referred to as an "independent motion controller" because the position commands generated by it (in a manner analogous to that described above) are independent of the part program. Instead, the position commands from the independent motion controller are generated by a separate program which usually runs on a programmable controller which interfaces with the main controller and with the machine by way of a machine applications interface (MAI). That program generates moves required for tool changes, pallet shuttle, alignment, jogging and other human operator-initiated functions. The two position commands for each respective axis are then summed and input to the servo stage for that axis.
The servo includes a separate servo stage for each axis. Each servo stage includes a position loop having a characteristic gain factor, (K.sub.v). The position loop receives position commands as well as a position feedback signal in order to generate a velocity command. Each servo also includes a velocity loop usually characterized by a non-zero integral time factor, (T.sub.i) The velocity loop receives the velocity command from the position loop as well as a velocity feedback signal to generate a current signal which drives a motor coupled to the movable machine member (e.g. slide) for that axis. The motor is typically coupled mechanically to a tacho which generates the velocity feedback signal to the velocity loop. Generation of the position feedback signal is accomplished by means of a position feedback device such as a resolver or LVDT which may be mechanically coupled to either the drive motor or the movable machine element itself.
Prior art CNC machining controls particularly the ACRAMATIC .RTM. 950 may be even further understood with reference to the following publications each of which are available from Cincinnati Milacron, Inc. and are expressly incorporated herein by reference in their entireties:
Control Operation Manual for Cincinnati Milacron ACRAMATIC.RTM. 950 MC/PC Rel. 1.0 Computer Numerical Control Publication No. 7-000-0535-BM issued Jan. 12, 1989;
Control Maintenance Manual for Cincinnati Milacron ACRAMATIC.RTM. 950 Rel. 1.0 Computer Numerical Control Publication No. 7-000-0535-MA issued May 20, 1988, and
Part Programming Manual for Cincinnati Milacron ACRAMATIC.RTM. 950 MC/PC Rel. 1.0 Computer Numerical Control Publication No. 7-000-0535-PM issued Dec. 14, 1988.
When prior art systems of the type just described are used to move a tool along a curved path of either an inside or an outside curve, the actual path followed by the tool will not conform closely to the path defined by the part program unless the radius of curvature is relatively large and/or the feedrate is low. The path radius error, i.e. the difference between the programmed path and the path actually traversed by the tool, increases significantly as the radius of curvature decreases and/or the feedrate increases Therefore, when machining a path having a small radius of curvature, it is necessary to move the tool much more slowly along the curve than cutting considerations alone will permit if path radius error is to be kept small. This limits productivity and adds to the cost of goods produced.
While path radius error is of concern when machining curves in general (except at relatively large radii and/or low feedrates), it is of particular concern when it is desired to machine relatively small diameter holes previously bored in a workpiece to a precise, desired size and with a good surface finish.
In the prior art such operations were generally performed by selecting a cutting or grinding tool of a proper size to be mounted on a rotating spindle. The part program would cause the tool to move along a clearance plane to the center coordinates of a bore whereupon the tool would be plunged interiorly of the bore to a desired depth. The tool would then be moved radially into contact with the surface of the bore and beyond until the tool reached the radial position corresponding to the desired size of the hole. Thereafter, the rotating cutter would be orbited 360 degrees at programmed feedrate to machine the hole to size. Upon completion of its orbit, the cutter would be withdrawn radially from the work surface to the interior of the hole from which location it could be raised to the clearance plane and be moved to the coordinates of any like-sized holes to be machined in a similar way.
If the remaining holes to be machined were of a substantially different size, they often could not be machined until a tool of a different size was selected and exchanged for the old tool. Obviously, the tool could be no larger than the diameter of the bore into which it was to be inserted. On the other hand, in order to acceptably limit surface discontinuities at the region where the tool first radially engaged the cutting path, it was generally preferred to select a tool whose diameter was fairly large in relation to the diameter of the hole to be machined so that the curvature of the tool and the hole would be similar. As an alternative to forming holes by milling or grinding, bores were often reamed to form holes of various sizes. In that case, a different reamer would have to be used for each different size of hole. Therefore, regardless of whether holes formed by milling, grinding or reaming, frequent tool changeovers would often be necessary when machining a plurality of holes of different sizes.
Even more importantly, as when machining curves in general, when machining holes, path radius error increased markedly as the radius of the hole decreased and/or the feedrate increased. Therefore, accurate machining of small holes was often slower than permitted by metal cutting considerations. The prior art also entailed a number of other practical disadvantages.
Because the tool engaged the work radially before orbiting and disengaged the work radially after orbiting, abrupt changes in direction along certain linear axes would be required in order to stop and start radial motion in order to respectively commence and end orbital motion. In order to execute these sudden changes of direction with accuracy, the transient response of the system required precise adjustment. Even then, such motion abrupt changes could generate large accelerations and decelerations and therefore, large reaction forces which could possibly perturb the positional relationship between the machine and the workpiece and produce blemishes on the workpiece. Also, because the tool would have to be both accelerated and decelerated along the orbit while machining the work, different portions of the orbit would be machined at different tangential velocities. As a result, the interior of the machined hole would be likely to exhibit a non-uniform surface finish. Moreover, such accelerations and decelerations added significantly to the cycle time required to form the hole.
Threading holes using prior art systems posed further problems. One commonly used technique was to use a tap of a diameter selected in accordance with the diameter of the hole to be threaded. The tap would be rotated in a given direction while being moved axially of the hole to form threads along the wall of the hole to a desired depth. As the desired thread depth increased so did the time required to form the thread. Also, once the tap was inserted to the desired thread depth, it could not simply be retracted while rotating in the same direction without destroying the tap and/or the threads. Instead, rotation of the tap in its original direction would have to be stopped and then reversed while the tap was axially retracted. Before the next hole of the same size could be threaded the rotation of tap would have to be stopped and reversed yet again. The finite acceleration and deceleration times required to effect these changes in rotary direction could add significantly to the machining time. Another significant drawback to tapping in cases where it was required to thread a plurality of holes of different diameters is that for each different hole size, a different tap was required--even if the thread size were the same. This too would increase the time required to machine the part.
As an alternative to tapping, it has been known in the prior art to form threads using a non-helical cutting tool, the diameter of which is smaller than the hole being threaded. Such a tool would be inserted interiorly of the hole to a desired depth at a rapid rate prior to threading and then moved radially into contact with the wall of the hole to begin cutting threads. The cutter would then be orbited one or more times around the hole while simultaneously being moved axially to form threads of a desired depth and pitch. Upon completion of threading, the cutter would be withdrawn radially toward the center of the hole clear of the work surface and retracted from the hole without need of changing its direction of rotation. Also, the same tool could be used to thread holes of different diameters having the same thread size.
Despite these relative advantages, this technique suffered from disadvantages similar to those of machining technique described above. Most notably, radial engagement and disengagement of the tool would subject the machine to undesirable reaction forces. Also due to the need to accelerate and decelerate the tool at the beginning and end, respectively of its orbit cycle times would be lengthened considerably and the threads in different areas of the hole would be formed at different tangential velocities and therefore subject to surface non-uniformities. Moreover, if the hole were of relatively small diameter, good path accuracy would require significant feedrate reductions.